package com.alliky.cart.ui.viewmodel

import androidx.lifecycle.viewModelScope
import androidx.paging.ExperimentalPagingApi
import androidx.paging.PagingData
import androidx.paging.cachedIn
import com.alliky.core.base.BaseViewModel
import com.rrc.common.entity.GoodsVO
import kotlinx.coroutines.flow.Flow

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2023/2/9 16:35
 * ================================================
 */
@ExperimentalPagingApi
class CartViewModel : BaseViewModel() {
    fun recommondPagingFlow(): Flow<PagingData<GoodsVO>> =
        repo.getHotGoods().cachedIn(viewModelScope)
}